package com.example.designPatterns.observer;

/**
 * @Title: Observer
 * @Description: TODO
 * @Date 2019/8/8 17:25
 */
public class User implements Observer {

    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    public User() {
    }

    public User(String name) {
        this.name = name;
    }

    @Override
    public void push(String msg) {
        System.out.println(name + " 收到推送消息： " + msg);
    }
}
